<?php  include VIEWPATH.'common/head.php';  ?>
    <link href="<?php echo FONT_PATH.'static/bootstrap/';?>css/login.min.css" rel="stylesheet">
    <style>
        .code{color: #333; width: 70%;float: left;}
        .v_send{float: right;}
    </style>
    <script type="text/javascript">
        var status = '<?php echo $_GET['status'];?>';
        if(status == '-1'){
            alert('fail:<?php echo $_GET['msg'];?>');
        }
        if(window.top!==window.self){
            window.top.location=window.location
        };
        $(document).keypress(function(e) {
            var e = e || event,
                keycode = e.which || e.keyCode;
            if (keycode==13) {
                onsubmit_t();
            }
        });
        function onsubmit_t(){
            var username = $("#username").val();
            var password = $("#password").val();
            if(!username || !password){
                alert('用户名、密码不能为空');
                return;
            }
            $("#loginForm").submit();
            return true;
        }
        function send_code(){
            var mobile = $("#mobile").val();
            var is_mobile = valid_moblie(mobile);
            if(!is_mobile){
                alert("手机号格式错误");
                return false;
            }
            var url = "index.php?c=login&m=send_code";
            var param = {"mobile":mobile};
            common_ajax(url, param, function(data){
                if(data.errorCode == 0) {
                    alert("短信发送成功");
                    return true;
                }else{
                    alert(data.errorMsg);
                    return false;
                }
            });
        }
    </script>
<body class="signin">
<div class="signinpanel">
    <div class="row">
        <div class="col-sm-7">
            <div class="signin-info">
                <div class="logopanel m-b">
                    <h1>nuannuan.vip</h1>
                </div>
                <div class="m-b"></div>
                <h4>欢迎使用 <strong>暖光 后台内容管理系统</strong></h4>
            </div>
        </div>
        <div class="col-sm-5">
            <form method="post" name="form" id="loginForm" action="index.php?c=login&m=do_login">
                <input type="hidden" name="submits" value="1"/>
                <h4 class="no-margins">登录：</h4>
                <p class="m-t-md">登录到暖光后台</p>
                <input type="text" class="form-control uname"  name="username" id="username" value="" placeholder="手机号">
                <input type="password" class="form-control pword m-b" name="password" id="password" value="" placeholder="密码">
                <input type="hidden" name="login_type" id="login_type" value="1">
                <a href="javascript:void(0)">忘记密码了？</a>
                <button class="btn btn-success btn-block" type="button" name="btn" onclick="onsubmit_t()" >登录</button>
            </form>
        </div>
    </div>
    <div class="signup-footer">
        <div class="pull-left">
            © 2016 All Rights Reserved. <a href="#" target="_blank" title="暖光">暖光</a>
        </div>
    </div>
</div>

<?php  include VIEWPATH.'common/footer.php';  ?>